package com.mlh.aop;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class AopTest {
    public static void main(String[] args) {
        ApplicationContext ac= new AnnotationConfigApplicationContext(SpringAopConfig.class);
        UsbInterface phone = (UsbInterface)ac.getBean("phone");
        phone.work();
        System.out.println("====================");
        UsbInterface camera = (UsbInterface)ac.getBean("camera");
        camera.work();
    }

}
